1
2
3
4 package joeq.ClassLib.Common.java.lang;
5
6 import joeq.Runtime.Unsafe;
7
8 /***
9 * Double
10 *
11 * @author John Whaley <jwhaley@alum.mit.edu>
12 * @version $Id: Double.java 1456 2004-03-09 22:01:46Z jwhaley $
13 */
14 abstract class Double {
15
16
17 public static long doubleToLongBits(double value) {
18 if (java.lang.Double.isNaN(value)) return 0x7ff8000000000000L;
19 return Unsafe.doubleToLongBits(value);
20 }
21 public static long doubleToRawLongBits(double value) {
22 return Unsafe.doubleToLongBits(value);
23 }
24 public static double longBitsToDouble(long bits) {
25 return Unsafe.longBitsToDouble(bits);
26 }
27
28 }